const names: string[] = ['马云', '马化腾', '许家印']

/*匿名函数建议不需要添加类型注解*/
names.forEach((item:string,index:number,array:string[])=>{
    console.log(item,index,array)
})

names.forEach((item,index,array)=>{
    console.log(item,index,array)
})
